import request from '@/sheep/request';

export default {
	// 文章分类列表
	getArticleCategory: () => {
		return request({
		    url: '/promotion/article-category/nv-list',
		    method: 'GET',
		});		
	},
	// 获得文章列表
	getArticleListAll: () => {
		return request({
		    url: '/promotion/article/list',
		    method: 'GET',
		});		
	},
	// 搜索
	getArticleSearch: (params) => {
			return request({
					url: '/promotion/article/search-page',
					method: 'GET',
					params: { ...params }
			});
	},
	// 根据分类获得文章列表
	getArticleListByCategory: (params) => {
		return request({
		    url: '/promotion/article/page',
		    method: 'GET',
			params: { ...params }
		});		
	},
	// 获得文章详情
	getArticle: (id) => {
			return request({
					url: '/promotion/article/get',
					method: 'GET',
					params: { id }
			});
	},
	// 增加浏览量
	addBrowseCount: (id) => {
			return request({
					url: '/promotion/article/add-browse-count',
					method: 'PUT',
					params: { id }
			});
	},
}
